package com.gph.saviorframework.os.authz.web.controller;

import com.gph.saviorframework.shiro.verification.VerificationCodeGenerator;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 生成验证码的控制器
 */
@RestController
public class CodeController {

    @RequestMapping("/genVerCode")
    public void getKaptchaImage(HttpServletRequest request, HttpServletResponse response) throws Exception {

        VerificationCodeGenerator.genCode(request, response);
    }
}
